--------------------------------------------------------------------------------------------
       log:  D:\StayingAlive\Chapter9Replication\TerritorialChange\warcrosstabs.log
  log type:  text
 opened on:  15 Feb 2004, 22:01:48

. do "C:\DOCUME~1\JAMESM~1\LOCALS~1\Temp\STD00000000.tmp"

. insheet using waroutcomes.csv
(102 vars, 382 obs)

. 
. * Mindless renaming of variables to make Stata happy
. 
. ren s S

. ren w W

. ren w_mod W_mod

. ren opps oppS

. ren oppw oppW

. ren oppw_mod oppW_mod

. ren effectives effectiveS

. ren effectiveopps effectiveoppS

. ren effectives_mod effectiveS_mod

. ren effectiveopps_mod effectiveoppS_mod

. 
. gen bimodalW = 0

. replace bimodalW = 1 if W >= .75
(150 real changes made)

. 
. * The next line produces Table 9.4
. 
. tab2 bimodalW territoryalt if droppedcase == 0 &  nofighting == 0 & minorwardyad == 0, all
>  row exact

-> tabulation of bimodalW by territoryalt if droppedcase == 0 &  nofighting == 0 & minorward
> yad == 0 

+----------------+
| Key            |
|----------------|
|   frequency    |
| row percentage |
+----------------+

           |     territoryalt
  bimodalW |         0          1 |     Total
-----------+----------------------+----------
         0 |        66         48 |       114 
           |     57.89      42.11 |    100.00 
-----------+----------------------+----------
         1 |        56         19 |        75 
           |     74.67      25.33 |    100.00 
-----------+----------------------+----------
     Total |       122         67 |       189 
           |     64.55      35.45 |    100.00 

          Pearson chi2(1) =   5.5611   Pr = 0.018
 likelihood-ratio chi2(1) =   5.6918   Pr = 0.017
               Cram�r's V =  -0.1715
                    gamma =  -0.3638  ASE = 0.142
          Kendall's tau-b =  -0.1715  ASE = 0.070
           Fisher's exact =                 0.020
   1-sided Fisher's exact =                 0.013

. 
. * The next line adds minor war cases to Table 9.4 as discussed in fn. 19.
. 
. tab2 bimodalW territoryalt if droppedcase == 0 &  nofighting == 0, all row exact

-> tabulation of bimodalW by territoryalt if droppedcase == 0 &  nofighting == 0 

+----------------+
| Key            |
|----------------|
|   frequency    |
| row percentage |
+----------------+

           |     territoryalt
  bimodalW |         0          1 |     Total
-----------+----------------------+----------
         0 |        76         51 |       127 
           |     59.84      40.16 |    100.00 
-----------+----------------------+----------
         1 |        79         20 |        99 
           |     79.80      20.20 |    100.00 
-----------+----------------------+----------
     Total |       155         71 |       226 
           |     68.58      31.42 |    100.00 

          Pearson chi2(1) =  10.2821   Pr = 0.001
 likelihood-ratio chi2(1) =  10.5820   Pr = 0.001
               Cram�r's V =  -0.2133
                    gamma =  -0.4522  ASE = 0.123
          Kendall's tau-b =  -0.2133  ASE = 0.063
           Fisher's exact =                 0.001
   1-sided Fisher's exact =                 0.001

. 
. * Generate power differential variables
. 
. gen powerdiff = 2

. replace powerdiff = 1 if powerratio < .4
(155 real changes made)

. replace powerdiff = 3 if powerratio > .6
(176 real changes made)

. gen weaker = powerdiff

. replace weaker = 0 if powerdiff == 2
(51 real changes made)

. replace weaker = 0 if powerdiff == 3
(176 real changes made)

. gen stronger = 4 - powerdiff

. replace stronger = 0 if powerdiff == 2
(51 real changes made)

. replace stronger = 0 if powerdiff == 1
(155 real changes made)

. 
. * Next line produces Table 9.5
. 
. tab2 stronger territoryalt if droppedcase == 0 & nofighting == 0 & minorwardyad == 0 & bim
> odalW == 0, all exact row

-> tabulation of stronger by territoryalt if droppedcase == 0 & nofighting == 0 & minorwardy
> ad == 0 & bimodalW == 0 

+----------------+
| Key            |
|----------------|
|   frequency    |
| row percentage |
+----------------+

           |     territoryalt
  stronger |         0          1 |     Total
-----------+----------------------+----------
         0 |        40         21 |        61 
           |     65.57      34.43 |    100.00 
-----------+----------------------+----------
         1 |        26         27 |        53 
           |     49.06      50.94 |    100.00 
-----------+----------------------+----------
     Total |        66         48 |       114 
           |     57.89      42.11 |    100.00 

          Pearson chi2(1) =   3.1739   Pr = 0.075
 likelihood-ratio chi2(1) =   3.1825   Pr = 0.074
               Cram�r's V =   0.1669
                    gamma =   0.3284  ASE = 0.172
          Kendall's tau-b =   0.1669  ASE = 0.093
           Fisher's exact =                 0.089
   1-sided Fisher's exact =                 0.056

. 
. * Next line varies Table 9.5 by adding in minor war cases; the relationship
. * remains strong as with Table 9.4
. 
. tab2 stronger territoryalt if droppedcase == 0 & nofighting == 0 & bimodalW == 0, all exac
> t row

-> tabulation of stronger by territoryalt if droppedcase == 0 & nofighting == 0 & bimodalW =
> = 0 

+----------------+
| Key            |
|----------------|
|   frequency    |
| row percentage |
+----------------+

           |     territoryalt
  stronger |         0          1 |     Total
-----------+----------------------+----------
         0 |        47         22 |        69 
           |     68.12      31.88 |    100.00 
-----------+----------------------+----------
         1 |        29         29 |        58 
           |     50.00      50.00 |    100.00 
-----------+----------------------+----------
     Total |        76         51 |       127 
           |     59.84      40.16 |    100.00 

          Pearson chi2(1) =   4.3035   Pr = 0.038
 likelihood-ratio chi2(1) =   4.3138   Pr = 0.038
               Cram�r's V =   0.1841
                    gamma =   0.3623  ASE = 0.160
          Kendall's tau-b =   0.1841  ASE = 0.088
           Fisher's exact =                 0.046
   1-sided Fisher's exact =                 0.029

. 
. * The next lines generate a test that Bruce cut from the book.  Small W should
. * take territory that generates more resources that large W systems.  We measure
. * value by population * population density, using the idea that highly populated
. * areas are more productive.  The test is a t-test in the difference in means
. * of the log of value of the territory between small and large W systems.
.  
. mvdecode areaofunitinkilometerssquared populationofunit, mv(-9)
areaofunit~d: 8 missing values generated
population~t: 20 missing values generated

. gen valueofterritory = log((populationofunit^2)/ areaofunitinkilometerssquared)
(321 missing values generated)

. ttest valueofterritory if territory == 1, by(bimodalW)

Two-sample t test with equal variances

------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. Err.   Std. Dev.   [95% Conf. Interval]
---------+--------------------------------------------------------------------
       0 |      44    17.08159    .4356033    2.889466    16.20311    17.96007
       1 |      17    15.72104    .8777421    3.619023    13.86031    17.58177
---------+--------------------------------------------------------------------
combined |      61    16.70242    .4019296     3.13917    15.89844     17.5064
---------+--------------------------------------------------------------------
    diff |             1.36055    .8864987               -.4133301    3.134429
------------------------------------------------------------------------------
Degrees of freedom: 59

                      Ho: mean(0) - mean(1) = diff = 0

     Ha: diff < 0               Ha: diff != 0              Ha: diff > 0
       t =   1.5347                t =   1.5347              t =   1.5347
   P < t =   0.9349          P > |t| =   0.1302          P > t =   0.0651

. 
. * The next line produces Table 9.6
. 
. tab2 bimodalW leaderchange if droppedcase == 0 &  nofighting == 0 & minorwardyad == 0, all
>  row exact

-> tabulation of bimodalW by leaderchange if droppedcase == 0 &  nofighting == 0 & minorward
> yad == 0 

+----------------+
| Key            |
|----------------|
|   frequency    |
| row percentage |
+----------------+

           |     leaderchange
  bimodalW |         0          1 |     Total
-----------+----------------------+----------
         0 |       101         13 |       114 
           |     88.60      11.40 |    100.00 
-----------+----------------------+----------
         1 |        64         11 |        75 
           |     85.33      14.67 |    100.00 
-----------+----------------------+----------
     Total |       165         24 |       189 
           |     87.30      12.70 |    100.00 

          Pearson chi2(1) =   0.4345   Pr = 0.510
 likelihood-ratio chi2(1) =   0.4291   Pr = 0.512
               Cram�r's V =   0.0479
                    gamma =   0.1436  ASE = 0.215
          Kendall's tau-b =   0.0479  ASE = 0.074
           Fisher's exact =                 0.512
   1-sided Fisher's exact =                 0.328

. 
. gen verysmallW = 0

. replace verysmallW = 1 if W < .5
(167 real changes made)

. gen bimodaloppW = 0

. replace bimodaloppW = 1 if oppW >= .75
(46 real changes made)

. gen verysmalloppW = 0

. replace verysmalloppW = 1 if oppW < .5
(242 real changes made)

. 
. * The next table was dropped from book; leaders with very small winning coalitions
. * are very unlikely to remove enemy leaders.
. 
. tab2 verysmallW leaderchange if droppedcase == 0 &  nofighting == 0 & minorwardyad == 0, a
> ll row exact

-> tabulation of verysmallW by leaderchange if droppedcase == 0 &  nofighting == 0 & minorwa
> rdyad == 0 

+----------------+
| Key            |
|----------------|
|   frequency    |
| row percentage |
+----------------+

           |     leaderchange
verysmallW |         0          1 |     Total
-----------+----------------------+----------
         0 |       106         21 |       127 
           |     83.46      16.54 |    100.00 
-----------+----------------------+----------
         1 |        59          3 |        62 
           |     95.16       4.84 |    100.00 
-----------+----------------------+----------
     Total |       165         24 |       189 
           |     87.30      12.70 |    100.00 

          Pearson chi2(1) =   5.1415   Pr = 0.023
 likelihood-ratio chi2(1) =   5.9437   Pr = 0.015
               Cram�r's V =  -0.1649
                    gamma =  -0.5915  ASE = 0.207
          Kendall's tau-b =  -0.1649  ASE = 0.056
           Fisher's exact =                 0.034
   1-sided Fisher's exact =                 0.016

. 
. * The next line generates Table 9.7a
. 
. tab2 bimodaloppW leaderchange if droppedcase == 0 &  nofighting == 0 & minorwardyad == 0 &
>  verysmallW == 0, all row exact

-> tabulation of bimodaloppW by leaderchange if droppedcase == 0 &  nofighting == 0 & minorw
> ardyad == 0 & verysmallW == 0 

+----------------+
| Key            |
|----------------|
|   frequency    |
| row percentage |
+----------------+

bimodalopp |     leaderchange
         W |         0          1 |     Total
-----------+----------------------+----------
         0 |        90         17 |       107 
           |     84.11      15.89 |    100.00 
-----------+----------------------+----------
         1 |        16          4 |        20 
           |     80.00      20.00 |    100.00 
-----------+----------------------+----------
     Total |       106         21 |       127 
           |     83.46      16.54 |    100.00 

          Pearson chi2(1) =   0.2065   Pr = 0.650
 likelihood-ratio chi2(1) =   0.1980   Pr = 0.656
               Cram�r's V =   0.0403
                    gamma =   0.1392  ASE = 0.303
          Kendall's tau-b =   0.0403  ASE = 0.094
           Fisher's exact =                 0.743
   1-sided Fisher's exact =                 0.430

. 
. * The next line generates Table 9.7b
. 
. tab2 verysmalloppW leaderchange if droppedcase == 0 & nofighting == 0 & minorwardyad == 0 
> & verysmallW == 0, all row exact

-> tabulation of verysmalloppW by leaderchange if droppedcase == 0 & nofighting == 0 & minor
> wardyad == 0 & verysmallW == 0 

+----------------+
| Key            |
|----------------|
|   frequency    |
| row percentage |
+----------------+

verysmallo |     leaderchange
       ppW |         0          1 |     Total
-----------+----------------------+----------
         0 |        41         12 |        53 
           |     77.36      22.64 |    100.00 
-----------+----------------------+----------
         1 |        65          9 |        74 
           |     87.84      12.16 |    100.00 
-----------+----------------------+----------
     Total |       106         21 |       127 
           |     83.46      16.54 |    100.00 

          Pearson chi2(1) =   2.4573   Pr = 0.117
 likelihood-ratio chi2(1) =   2.4230   Pr = 0.120
               Cram�r's V =  -0.1391
                    gamma =  -0.3577  ASE = 0.211
          Kendall's tau-b =  -0.1391  ASE = 0.089
           Fisher's exact =                 0.148
   1-sided Fisher's exact =                 0.093

. 
. clear

. exit

end of do-file

. log close
       log:  D:\StayingAlive\Chapter9Replication\TerritorialChange\warcrosstabs.log
  log type:  text
 closed on:  15 Feb 2004, 22:02:12
--------------------------------------------------------------------------------------------
